/**
 * Created by 000188 on 2016/6/27.
 */
import React from 'react';

let Btn  =  React.createClass({
    render(){
        return <div className="btn" style={{width:this.props.width}}>
            <button onClick={this.props.click || this.open}>{this.props.text}</button>
            <span>{this.props.title || ''}</span>
        </div>
    },
    open(){
        if(this.props.href){
            window.open(this.props.href)
        }
    }
})

module.exports = Btn;

